::configure for dir
set remote_apk_dir="/sdcard/apk"
set remote_terminal_config_dir="/data/edu"
set remote_terminal_exe_dir="/data/app-lib/edu/"
set remote_terminal_tmp_dir="/data/edu_tmp"

set bat_drive=%~d0%
set bat_dir=%cd%

::begin
%bat_drive%
cd %bat_dir%/adb

::for apk
::adb shell mkdir -p %remote_apk_dir%

::this is no use
::adb push ../apk/WPSOffice_146.apk %remote_apk_dir%
::adb push ../apk/DrawView2.66ForAndroid_CN.apk %remote_apk_dir%
::adb push ../apk/EduCloudApp.apk %remote_apk_dir%
::adb push ../apk/MicrosoftRemoteDesktop.apk %remote_apk_dir%
::adb push ../apk/360yunpan_android_7.0.18.apk %remote_apk_dir%
::adb push ../apk/baiduyun_458.apk %remote_apk_dir%
::adb push ../apk/cn.wps.livespace_3.6.10_30610.apk %remote_apk_dir%
::adb push ../apk/Weiyun_3.6.5.857_android_r41168_20160421173930_release_1.apk %remote_apk_dir%
::adb push ../apk/baiduinput_AndroidPhone_1000e.apk %remote_apk_dir%
::adb push ../apk/com.estrongs.android.pop_4.0.4_501.apk %remote_apk_dir%
::adb push ../apk/UCliulanqi_647.apk %remote_apk_dir%
::adb push ../apk/AdobeFlashPlayer111_111115081.apk %remote_apk_dir%
::adb push ../apk/weiruanyczmian.pc6.apk %remote_apk_dir%
::adb push ../apk/com.google.android.apps.photos_259339.apk %remote_apk_dir%


::this must be exe
adb install ../apk/WPSOffice_146.apk
adb install ../apk/DrawView2.66ForAndroid_CN.apk
adb install ../apk/EduCloudApp.apk
adb install ../apk/MicrosoftRemoteDesktop.apk
::adb install ../apk/360yunpan_android_7.0.18.apk
adb install ../apk/baiduyun_458.apk
::adb install ../apk/cn.wps.livespace_3.6.10_30610.apk
adb install ../apk/Weiyun_3.6.5.857_android_r41168_20160421173930_release_1.apk
adb install ../apk/baiduinput_AndroidPhone_1000e.apk
adb install ../apk/com.estrongs.android.pop_4.0.4_501.apk
adb install ../apk/UCliulanqi_647.apk
adb install ../apk/AdobeFlashPlayer111_111115081.apk
adb install ../apk/weiruanyczmian.pc6.apk
adb install ../apk/com.google.android.apps.photos_259339.apk
adb install ../apk/Calibration.apk
adb install ../apk/mirrorop-receiver 1.0.1.4.apk
::adb install ../apk/USBNetworkGatev3.5.0build.apk
adb install ../apk/AirPin_PRO.apk
::adb install ../apk/WiFi-Display-miracast-sink.1.6_signed.apk
adb install ../apk/Incast-usb_network_gate_signed.apk
adb install ../apk/Incast-WiFi-Display_signed.apk


adb shell rm -rf %remote_apk_dir%/WPSOffice_146.apk
adb shell rm -rf %remote_apk_dir%/DrawView2.66ForAndroid_CN.apk
adb shell rm -rf %remote_apk_dir%/EduCloudApp.apk
adb shell rm -rf %remote_apk_dir%/MicrosoftRemoteDesktop.apk
::adb shell rm -rf %remote_apk_dir%/360yunpan_android_7.0.18.apk
adb shell rm -rf %remote_apk_dir%/baiduyun_458.apk
::adb shell rm -rf %remote_apk_dir%/cn.wps.livespace_3.6.10_30610.apk
adb shell rm -rf %remote_apk_dir%/Weiyun_3.6.5.857_android_r41168_20160421173930_release_1.apk
adb shell rm -rf %remote_apk_dir%/baiduinput_AndroidPhone_1000e.apk
adb shell rm -rf %remote_apk_dir%/UCliulanqi_647.apk
adb shell rm -rf %remote_apk_dir%/AdobeFlashPlayer111_111115081.apk
adb shell rm -rf %remote_apk_dir%/weiruanyczmian.pc6.apk
adb shell rm -rf %remote_apk_dir%/com.android.chrome.apk
adb shell rm -rf %remote_apk_dir%/com.google.android.apps.photos_259339.apk
adb shell rm -rf %remote_apk_dir%/Calibration.apk
adb shell rm -rf %remote_apk_dir%/mirrorop-receiver 1.0.1.4.apk
::adb shell rm -rf %remote_apk_dir%/USBNetworkGatev3.5.0build.apk
adb shell rm -rf %remote_apk_dir%/AirPin_PRO.apk
::adb shell rm -rf %remote_apk_dir%/WiFi-Display-miracast-sink.1.6_signed.apk
adb shell rm -rf %remote_apk_dir%/Incast-usb_network_gate_signed.apk
adb shell rm -rf %remote_apk_dir%/Incast-WiFi-Display_signed.apk


::for terminal
adb shell mkdir -p %remote_terminal_config_dir%
adb shell mkdir -p %remote_terminal_tmp_dir%
adb shell mkdir -p %remote_terminal_exe_dir%

adb push ../terminal/Terminal %remote_terminal_exe_dir%
adb push ../terminal/remoteshell %remote_terminal_exe_dir%
adb push ../terminal/holdprocess.data %remote_terminal_config_dir%
adb push ../terminal/start.sh %remote_terminal_config_dir%
adb push ../terminal/terminal.config %remote_terminal_config_dir%
adb push ../terminal/edu_cloud_html.config %remote_terminal_config_dir%

adb shell chmod 777 %remote_terminal_config_dir%/edu_cloud_html.config
adb shell chmod 777 %remote_terminal_config_dir%/terminal.config
adb shell chmod 777 %remote_terminal_config_dir%/start.sh 


::for other
::get root for usb net gate
adb remount
adb push ../rootTool/fastboot/root.tar /system/usr/
adb push ../rootTool/fastboot/quick_root.sh /system/usr/
adb shell chmod 777 /system/usr/quick_root.sh
adb shell /system/usr/quick_root.sh

adb shell reboot

pause
